home *** CD-ROM | disk | FTP | other *** search
/ Comix Games / Comix Games.iso / jetsons / jetsons.exe / jetsons.dxr / 00043.ls < prev    next >
Encoding:
Text File  |  1996-11-19  |  1.1 KB  |  27 lines

  1. on CheckOtherSHipCollisions
  2.   global theFirstShipChannel, theBackgroundVelocity, theFirstOtherShipChannel, theLastOtherShipChannel, theOtherShipVelocity
  3.   repeat with h = theFirstOtherShipChannel to theLastOtherShipChannel
  4.     if sprite h intersects theFirstShipChannel then
  5.       if theBackgroundVelocity = 0 then
  6.         PlayBounceSound()
  7.         set theBackgroundVelocity to 2 * theOtherShipVelocity
  8.         set temp to theOtherShipVelocity
  9.         set theOtherShipVelocity to 0
  10.         DoEveryFrame()
  11.         DoEveryFrame()
  12.         set theOtherShipVelocity to temp
  13.         next repeat
  14.       end if
  15.       if ((theBackgroundVelocity < 0) and (the left of sprite theFirstShipChannel < the left of sprite h)) or ((theBackgroundVelocity > 0) and (the right of sprite theFirstShipChannel > the right of sprite h)) then
  16.         PlayBounceSound()
  17.         set theBackgroundVelocity to -theBackgroundVelocity
  18.         set temp to theOtherShipVelocity
  19.         set theOtherShipVelocity to 0
  20.         DoEveryFrame()
  21.         set theOtherShipVelocity to temp
  22.         return 
  23.       end if
  24.     end if
  25.   end repeat
  26. end
  27.